<?php
      require_once (__ROOT__.'\controller\cart_controller.php');
?>
<?php foreach($_SESSION['cartitem'] as $item) : ?>
    <tbody>
	<tr>
            <td class="cart_product">
                <a href=""><img width="90px" src="<?php echo HOST ?>/images/product/<?php echo $item['image']; ?>" alt=""></a>
            </td>
            <td class="cart_description">
		<h4><a href=""><?php echo $item['name']; ?></a></h4>
            </td>
            <td class="cart_price">
                <p><?php echo number_format($item['price'] , 0, ',', '.'); ?> Đồng</p>
            </td>
            <td class="cart_quantity">
		<div class="cart_quantity_button">
                    <a class="cart_quantity_up" href="view_cart.php?name=<?php echo $item['name'] ?>&quantity=<?php echo $item['quantity']+1; ?>"> + </a>
                    <form action="view_cart.php?name=<?php echo $item['name'] ?>" method="post">
                        <input class="cart_quantity_input" type="text" name="quantity" value="<?php echo $item['quantity']; ?>" autocomplete="off" size="2">
                    </form>
                    <a class="cart_quantity_down" href="view_cart.php?name=<?php echo $item['name'] ?>&quantity=<?php echo $item['quantity']-1; ?>"> - </a>
		</div>
            </td>
            <td class="cart_total">
                <p class="cart_total_price"><?php echo number_format($item['quantity']*$item['price'] , 0, ',', '.'); ?> Đồng</p>
            </td>
            <td class="cart_delete">
                <a class="cart_quantity_delete" href="view_cart.php?action=remove&name=<?php echo $item['name']; ?>"><i class="fa fa-times"></i></a>
            </td>
	</tr>
    </tbody>					
<?php endforeach; ?>